#include <iostream>
#include <cstdlib>

using namespace std;

int main(int argc, char *argv[]) {
    void *memAddr;
    int err = posix_memalign(&memAddr, 1024*sizeof(void*), 65536);
    if (err != 0) {
        cerr << "posix_memalign error: " << err << endl;
        exit(err);
    }
    cout << "posix_memalign memory address: " << memAddr << endl;

    return 0;
}
